<!DOCTYPE html>
<html>
    <head lang="en">
        <meta charset="UTF-8">
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">	
        <link rel="shortcut icon" type="image/x-icon" href="{{URL::asset('handan/images/logo-icon.png')}}" />
        <title>数据分析</title>
        <link rel="stylesheet" href="{{URL::asset('mobile/css/public.css') }}"/>
        <link rel="stylesheet" type="text/css" href="{{URL::asset('newmobile/css/dataFenXi.css') }}"/>
        <script src="{{URL::asset('public_js/jquery-3.2.1.min.js')}}"></script>
		<script src="{{URL::asset('mobile/js/public.js') }}"></script>
	<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts.js') }}"></script>
	<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-3d.js')}}"></script>
	<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-zh_CN.js')}}"></script>
	<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/modules/exporting.js') }}"></script>
	<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-more.js') }}"></script>
	<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/modules/solid-gauge.js') }}"></script>
    </head>
<body>
<!-- header Start -->
<header>
	<p>
		<span>{{$data[0]->allpoint?$data[0]->allpoint:0}}</span>
		点
	</p>
	<p>总盈利点数</p>
</header>
<!-- header end -->
<!-- DataShow start -->
<div class="DataShow">
	<span>
		<p>{{$data[0]->zxprofit?$data[0]->zxprofit:0}}点</p>
		<p>正向收益</p>
	</span>
	<span>
		<p>{{$data[0]->fxprofit?$data[0]->fxprofit:0}}点</p>
		<p>反向收益</p>
	</span>
	<span>
		<p>{{$dingyuenum?$dingyuenum:0}}</p>
		<p>历史订阅</p>
	</span>
</div>
<!-- DataShow end -->
<!-- 图表title Start -->
<div class="dataTitle">
	收益曲线图
</div>
<!-- 图表title end -->
<!-- 图表  Start -->
<div class="Jxc_charts">
	<div id="profit_chart" style="height: 7.0rem;" ></div>
</div>
<!-- 图表 end  -->
<!--  底部 start  -->
<div style="height: 3rem;"></div>
@include('newmobile.footer')
<!-- 底部 end  -->
</body>
</html>

<script>
	// 收益曲线
	var xmydata11 = [];
	var xmypoint='{{ $pointDayJiaoyi }}';
	var xmytime='{{ $timeDayJiaoyi }}';
	xmytime = xmytime.split(',');
	xmypoint = xmypoint.split(',');
	xmypoint.forEach(function(data,index,arr){
		xmydata11.push(+data);
	});
	profitChart("profit_chart",[xmytime,xmydata11]);
  // 总收益曲线图
function profitChart(id,data){
    var t = this;
    return new Highcharts.Chart({
        chart: {
            renderTo: id,
            type: "areaspline",
            zoomType: "xy",
            pinchType:'',// 让在移动端可以滑动
            backgroundColor: '#171922',
            height: 230
        },
        title: {
            text: null
        },
        colors: ["#ffc766"],
        legend: {
            enabled: false
        },
        credits: {
            enabled: false
        },
        exporting: {
            enabled:false
        },
        xAxis: {
            gridLineWidth: 0,
            lineColor: "#2E303E",
            tickColor: "#2E303E",
            gridLineColor: "#2E303E",
            categories:data[0],
            tickInterval: Math.ceil(data[0].length / 7),
            labels: {
                rotation: false,
            }
        },
        yAxis: {
            opposite: false, //Y轴在右侧
            gridLineWidth: 0.5,
            lineColor: "#2E303E",
            tickColor: "#2E303E",
            gridLineColor: "#22242f",
            title: {
                text: null
            },
            labels: {
            }
        },
        tooltip: {
            style: {
                color: "white"
            },
            borderWidth: 0,
            shadow: !1,
            backgroundColor: "rgba(34,34,34, 0.6)",
            shared: !0
        },
        plotOptions: {
            areaspline: {
                fillColor: {
                    linearGradient: {
                        x1: 0,
                        y1: 0,
                        x2: 0,
                        y2: 1
                    },
                    stops: [
                        [0, "#3b9ce0"],
                        [1, Highcharts.Color("#3b9ce0").setOpacity(0).get('rgba')]
                    ]
                },
                marker: {
                    radius: 0,
                    fillColor: "white",
                    lineWidth: 1,
                    lineColor: "#ffc766"
                },
                lineWidth: 1,
                states: {
                    hover: {
                        lineWidth: 1
                    }
                },
                threshold: null
            },
            series: {
                lineColor: "#3b9ce0"
            }
        },
        series: [{
            name: "盈利点位",
            data: data[1]
        }]
    })
}
</script>
